package org.jeecg.glr.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Select;
import org.jeecg.glr.entity.GlrLedMember;

import java.util.List;

/**
 * @Description: LED屏资源表
 * @Author: jeecg-boot
 * @Date:   2020-02-25
 * @Version: V1.0
 */
public interface GlrLedMemberMapper extends BaseMapper<GlrLedMember> {
    @Select("SELECT member_id FROM glr_led_menber WHERE column_id = #{columnId} and member_Type='2'")
    List<String> getResourceByColumnId(String columnId);
    @Select("SELECT member_id FROM glr_led_menber WHERE column_id = #{columnId} and member_Type='1'")
    List<String> getLedByColumnId(String columnId);
    @Select("SELECT MAX(order_code) AS order_code FROM glr_led_menber WHERE column_id = #{columnId} and member_Type='2'")
    Integer getGlrLedMemberorderCode(String columnId);

    @Delete("delete from glr_led_menber where column_id=#{columnId}")
    void delLedMemberByColumnId(String columnId);
}
